package com.grts.mall;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import com.grts.mall.common.CommonResult;

@ControllerAdvice
@RestControllerAdvice
public class GloableExceptionHandler{

	@ExceptionHandler
	public CommonResult hanResult(Exception exception) {
		return CommonResult.error(exception.getMessage());
	}
}
